--stringparam root.filename "index" \
xmldoc/babelmain.xsl \
xmldoc/readme.xml
+ tools/fixdoc $(WEB)/htmldoc-$(DOCVERSION) "GPSBabel $(DOCVERSION):"
chmod 755 tools/mkcapabilities
tools/mkcapabilities
xsltproc \
--output $@ \
--stringparam toc.section.depth "1" \
+ --stringparam html.cleanup "1" \
+ --stringparam make.clean.html "1" \
+ --stringparam html.valid.html "1" \
+ --stringparam html.stylesheet \
--stringparam html.stylesheet \
"http://www.gpsbabel.org/style3.css" \
http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl \
--- /dev/null
+#/bin/sh
+
+# set -e
+
+# for the customizations that I'm tired of fighting babelmain.xsl to get
+# docbook to produce HTML that plays nice with Smarty.
+# This tries to codify a bunch of manual and automated fixes that were needed
+# before to bludgeon our docbook output into Dreamweaver's terrible templating
+# system.
+
+DIR=$1
+TITLE=$2
+
+SED=sed
+[ -f /opt/local/bin/gsed ] && SED=/opt/local/bin/gsed
+
+[ ! -d $DIR/tpl ] && mkdir -p $DIR/tpl
+
+
+for f in $DIR/*.html
+do
+ base=$(echo $f | sed "s/.html$//")
+ $SED -i \
+ -e '/^<?xml/d' \
+ -e '/^<!DOCTYPE head/d' \
+ -e "s#<title>#{block name=title}${TITLE}#" \
+ -e 's#<\/title>.*#{/block}#' \
+ -e '/^<head/d' \
+ -e 's#style="clear: both"##' \
+ $f
+ mv ${base}.html $(dirname $base)/tpl/$(basename $f .html).tpl
+ cat > ${base}.html << EOF
+<?php
+require("../lib/smarty_common.php");
+\$smarty->display(\$template);
+?>
+EOF
+
+done
<xsl:template name="system.head.content">
<xsl:text>
</xsl:text>
- <xsl:comment> InstanceBegin template="/Templates/primarypage.dwt" codeOutsideHTMLisLocked="false" </xsl:comment>
- <xsl:text>
- </xsl:text>
</xsl:template>
<!--
<xsl:template name="user.header.navigation">
<xsl:text>
</xsl:text>
- <xsl:comment> InstanceBeginEditable name="scontent" </xsl:comment>
</xsl:template>
<xsl:template name="user.footer.navigation">
<xsl:text>
</xsl:text>
- <xsl:comment> InstanceEndEditable </xsl:comment>
- <xsl:text>
- </xsl:text>
- <xsl:comment> InstanceEnd </xsl:comment>
- <xsl:text>
- </xsl:text>
</xsl:template>
+
+
+<xsl:template name="chunk-element-content" priority="100">
+ <xsl:param name="prev"/>
+ <xsl:param name="next"/>
+ <xsl:param name="nav.context"/>
+ <xsl:param name="content">
+ <xsl:apply-imports/>
+ </xsl:param>
+
+ {extends file="main.tpl"}
+ <xsl:call-template name="html.head">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ </xsl:call-template>
+ <xsl:call-template name="body.attributes"/>
+ {block name=body}
+ <xsl:call-template name="user.header.navigation"/>
+
+ <xsl:call-template name="header.navigation">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ <xsl:with-param name="nav.context" select="$nav.context"/>
+ </xsl:call-template>
+
+ <xsl:call-template name="user.header.content"/>
+
+ <xsl:copy-of select="$content"/>
+
+ <xsl:call-template name="user.footer.content"/>
+
+ <xsl:call-template name="footer.navigation">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ <xsl:with-param name="nav.context" select="$nav.context"/>
+ </xsl:call-template>
+
+ <xsl:call-template name="user.footer.navigation"/>
+ {/block}
+ <xsl:value-of select="$chunk.append"/>
+</xsl:template>
+
</xsl:stylesheet>